CREATE TABLE [dbo].[TMPROV_TESO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[NO_PROV] [dbo].[TD_VC_050] NULL,
[CO_TIPO_PROV] [dbo].[TD_VC_003] NOT NULL,
[CO_CATE] [dbo].[TD_VC_003] NULL,
[CO_CLNT] [dbo].[TD_VC_020] NULL,
[NU_RUCS] [dbo].[TD_VC_020] NULL,
[TI_CLAS_PROV] [dbo].[TD_VC_001] NULL,
[NO_RAZO_SOCI] [dbo].[TD_VC_050] NULL,
[NO_REPR_LEGA] [dbo].[TD_VC_050] NULL,
[NU_LICE_PROV] [dbo].[TD_VC_020] NULL,
[NU_EMPL] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TMPROV_TE__NU_EM__7913E27D] DEFAULT ((0)),
[NU_REGI_PUBL] [dbo].[TD_VC_010] NULL,
[AP_PATE_PROV] [dbo].[TD_VC_020] NULL,
[AP_MATE_PROV] [dbo].[TD_VC_020] NULL,
[NO_PROV_NATU] [dbo].[TD_VC_020] NULL,
[NO_PROV_0002] [dbo].[TD_VC_020] NULL,
[TI_DOCU_IDEN] [dbo].[TD_VC_003] NULL,
[NU_DOCU_IDEN] [dbo].[TD_VC_020] NULL,
[DE_PROF] [dbo].[TD_VC_020] NULL,
[DE_MAIL] [dbo].[TD_VC_050] NULL,
[DE_EMPR_VERI] [dbo].[TD_VC_050] NULL,
[NO_VERI] [dbo].[TD_VC_050] NULL,
[FE_VERI] [dbo].[TD_DT_001] NULL,
[OB_VERI] [dbo].[TD_VC_050] NULL,
[FE_INGR] [dbo].[TD_DT_001] NULL,
[TI_SITU] [dbo].[TD_VC_003] NULL,
[ST_USOS_LOGI] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_US__7A0806B6] DEFAULT ('N'),
[CO_DOCU_SUNA] [dbo].[TD_VC_003] NULL,
[NU_DOCU_SUNA] [dbo].[TD_VC_020] NULL,
[TI_PERS_SUNA] [dbo].[TD_VC_003] NULL,
[NU_RETE_SUNA] [dbo].[TD_VC_020] NULL,
[TI_NATU_JURI] [dbo].[TD_VC_003] NULL,
[NO_NATU_0001] [dbo].[TD_VC_020] NULL,
[NO_NATU_0002] [dbo].[TD_VC_020] NULL,
[NO_REPR] [dbo].[TD_VC_050] NULL,
[ST_RETE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_RE__7BF04F28] DEFAULT ('N'),
[ST_BCON] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_BC__7DD8979A] DEFAULT ('N'),
[ST_PERC] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_PE__7FC0E00C] DEFAULT ('N'),
[NO_CONT] [dbo].[TD_VC_050] NULL,
[ST_AFIL_SUDA] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_AF__01A9287E] DEFAULT ((0)),
[ST_AFIL_INTE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_AF__039170F0] DEFAULT ('N'),
[ST_AFIL_CRED] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMPROV_TE__ST_AF__04859529] DEFAULT ('N'),
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[NU_CNTA_DETR] [dbo].[TD_VC_020] NULL,
[TI_CNTA_MNAC] [dbo].[TD_VC_003] NULL,
[NU_CNTA_MNAC] [dbo].[TD_VC_020] NULL,
[TI_CNTA_MEXT] [dbo].[TD_VC_003] NULL,
[NU_CNTA_MEXT] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMPROV_TE__CO_US__0579B962] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMPROV_TE__FE_US__066DDD9B] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMPROV_TE__CO_US__076201D4] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMPROV_TE__FE_US__0856260D] DEFAULT (getdate()),
[CO_COND_PAGO] [dbo].[TD_VC_003] NULL,
[CO_RUBR] [dbo].[TD_VC_003] NULL,
[ST_COSE] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TMPROV_TE__ST_CO__094A4A46] DEFAULT ('N'),
[ST_LIDE] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TMPROV_TE__ST_LI__0B3292B8] DEFAULT ('N'),
[ST_HABI] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TMPROV_TE__ST_HA__0D1ADB2A] DEFAULT ('N')
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_AF__029D4CB7] CHECK NOT FOR REPLICATION (([ST_AFIL_SUDA]='N' OR [ST_AFIL_SUDA]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_BC__7ECCBBD3] CHECK NOT FOR REPLICATION (([ST_BCON]='N' OR [ST_BCON]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_CO__0A3E6E7F] CHECK NOT FOR REPLICATION (([ST_COSE]='N' OR [ST_COSE]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_HA__0E0EFF63] CHECK NOT FOR REPLICATION (([ST_HABI]='N' OR [ST_HABI]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_LI__0C26B6F1] CHECK NOT FOR REPLICATION (([ST_LIDE]='N' OR [ST_LIDE]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_PE__00B50445] CHECK NOT FOR REPLICATION (([ST_PERC]='N' OR [ST_PERC]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_RE__7CE47361] CHECK NOT FOR REPLICATION (([ST_RETE]='N' OR [ST_RETE]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] WITH NOCHECK ADD CONSTRAINT [CK__TMPROV_TE__ST_US__7AFC2AEF] CHECK NOT FOR REPLICATION (([ST_USOS_LOGI]='N' OR [ST_USOS_LOGI]='S'))
GO
ALTER TABLE [dbo].[TMPROV_TESO] ADD CONSTRAINT [PK__TMPROV_T__B5276DB269727791] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMPROV_TESO] ADD CONSTRAINT [FK__TMPROV_TE__CO_EM__1388ACEE] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
